<!--
  ~ MIT License
  ~
  ~ Copyright (c) 2021-2022 yangrunkang
  ~
  ~ Author: yangrunkang
  ~ Email: yangrunkang53@gmail.com
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  -->

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="index">
<!--css-->
<link th:fragment="css" type="text/css" rel="stylesheet" th:href="${ossStatic} + @{/css/content/history.css}"/>
<link th:fragment="css" type="text/css" rel="stylesheet" th:href="${ossStatic} + @{/css/common/img.css}"/>
<link th:fragment="css" type="text/css" rel="stylesheet" th:href="'/plugins/cherry/cherry-markdown.min.css?v='+${staticSourceVersion}"/>
<!--脚本-->
<script async="async" th:fragment="js" type="text/javascript" th:src="${ossStatic} + @{/js/content/history.js}"></script>
<!--内容-->
<div th:fragment="content">
    <div class="container">
        <div class="row g-2">
            <div class="col-lg-9 mb-2">
                <div class="card card-body shadow-sm border-bottom border-2 border-top-0 border-start border-end-0 p-2">
                    <div class="alert alert-warning">
                        您上次还有未完成的内容,是否继续编辑?
                    </div>
                    <div>
                        <a class="btn rounded-3 bg-gradient btn-primary" th:href="'/continue-editor?type='+${cacheContent.contentType.name()}+'&edit='+${cacheContent.edit}">继续编辑</a>
                        <a class="btn rounded-3 bg-gradient btn-secondary write-new" href="/before-editor?opt=new" data-bs-toggle="tooltip" data-bs-placement="right" title="提示:会清空下面未完成内容">丢弃,创建新的内容</a>
                        <a class="btn rounded-3 bg-gradient btn-primary continue-edit-draft" style="display: none" th:href="'/editor?type='+${cacheContent.contentType.name()}+'&opt=continue-edit-draft'" data-bs-toggle="tooltip" data-bs-placement="top" th:title="'提示:会擦除未完成的内容《'+${cacheContent.title}+'》'">继续编辑个人中心文章</a>
                    </div>
                    <p class="alert alert-secondary mt-3">上次未完成的内容:</p>
                    <div>
                        <div class="card-title">
                            <div class="text-black-50" th:if="!${#strings.isEmpty(cacheContent.title)}">标题:</div>
                            <div class="text-wrap cv-font" style="font-size: 30px" th:if="!${#strings.isEmpty(cacheContent.title)}" th:text="${cacheContent.title}"></div>
                        </div>
                        <div class="card-title">
                            <div class="text-black-50" th:if="!${#strings.isEmpty(cacheContent.content)}">正文:</div>
                            <div class="cherry-markdown" style="font-size: 16px;overflow:hidden" th:if="!${#strings.isEmpty(cacheContent.content)}" th:utext="${cacheContent.content}"></div>
                        </div>
                    </div>
                </div>
        </div>
            <div class="col-lg-3">
                <div class="card card-body shadow-sm border-bottom border-2 border-top-0 border-start border-end-0 p-2">
                    未完成的内容
                </div>
            </div>
        </div>
    </div>
</div>
</html>
